package com.rzico.sbl.model

import android.os.Parcelable
import com.amap.api.services.core.LatLonPoint
import com.xinnuo.common_ui.base.BaseBean
import kotlinx.parcelize.Parcelize

/**
 * 描 述：
 * 作 者：小卷毛  2021-05-21 15:01
 * 修改描述：
 * 修 改 人：
 * 修改版本：
 */
@Parcelize
data class OrderModel(
    var start: Int = 0,
    var recordsTotal: Int = 0,
    var data: ArrayList<OrderData> = ArrayList()
) : Parcelable

@Suppress("unused")
@Parcelize
data class OrderData(
    var id: String = "",
    var name: String? = "",
    var sellerName: String? = "",
    var memberId: String = "",
    var orderId: String? = "",
    var orderSn: String = "",
    var sn: String = "",
    var createDate: String = "",
    var orderDate: String? = "",
    var hopeDate: String? = "",
    var estimateDate: String? = "",
    var reminderDate: String? = "",
    var deliveryDate: String? = "",
    var completeDate: String? = "",
    var statusDescr: String = "",
    var status: String? = "",
    var quantity: String = "",
    var amount: String? = "",
    var amountPaid: String? = "",
    var amountPayable: String? = "",
    var paperPaid: String? = "",
    var settlementPrice: String? = "",
    var consignee: String? = "",
    var phone: String? = "",
    var address: String = "",
    var lat: String = "",
    var lng: String = "",
    var shippingId: String? = "",
    var shippingSn: String? = "",
    var cardMemo: String? = "",
    var memo: String? = "",
    var shipMemo: String? = "",
    var enterpriseName: String? = "",
    var adminName: String? = "",
    var adminMember: String? = "",
    var adminPhone: String? = "",
    var printStatus: String? = "",
    var methodDescr: String? = "",
    var adminFreight: String? = "",
    var payMethod: String? = "",
    var shippingMethod: String? = "",
    var meituanShopName: String? = "",
    var orderItems: ArrayList<OrderGoods> = ArrayList(),
    var shippingItems: ArrayList<OrderGoods> = ArrayList(),
    var isShipping: Boolean = false,
    var isFast: Boolean = false,
    var isFisrst: Boolean = false,
    var allowRob: Boolean = false,
    var check: Boolean = false
) : Parcelable {

    /**
     * 此种方法适用于Jackson解析时使用，Gson利用反射方式实现
     */
    fun getIsShipping() = isShipping
    fun setIsShipping(isShipped: Boolean) {
        isShipping = isShipped
    }

    fun getIsFast() = isFast
    fun setIsFast(fast: Boolean) {
        isFast = fast
    }

    fun getIsFirst() = isFisrst
    fun setIsFirst(first: Boolean) {
        isFisrst = first
    }
}

@Parcelize
data class OrderHeader(
    var orderSN: String = "",
    var shippingSn: String = "",
    var shipId: String = "",
    var hint: String = "",
    var time: String = "",
    var position: Int = -1,
    var status: String = "",
    var status_hint: String = ""
) : Parcelable

@Suppress("unused")
@Parcelize
data class OrderGoods(
    var orderSN: String = "",
    var status: String = "",
    var shippingSn: String = "",
    var shipId: String = "",
    var position: Int = -1,
    var id: String = "",
    var productId: String? = "",
    var goodsId: String? = "",
    var thumbnail: String = "",
    var spec: String? = "",
    var name: String = "",
    var price: String? = "",
    var quantity: String = "",
    var hopeDate: String = "",
    var reminderDate: String = "",
    var methodDescr: String = "",
    var consignee: String = "",
    var phone: String = "",
    var type: String? = "",
    var subType: String? = "",
    var isGift: Boolean = false,
    var fast: Boolean = false,
    var first: Boolean = false
) : Parcelable {
    fun getIsGift() = isGift
    fun setIsGift(gift: Boolean) {
        isGift = gift
    }
}

@Parcelize
data class OrderFooter(
    var position: Int = -1,
    var id: String = "",
    var sn: String = "",
    var orderId: String = "",
    var orderSN: String = "",
    var shippingSn: String = "",
    var status: String = "",
    var total_num: String = "",
    var amount: String = "",
    var amountHint: String = "",
    var settlementPrice: String = "",
    var name: String = "",
    var phone: String = "",
    var address: String = "",
    var cardMemo: String = "",
    var memo: String = "",
    var shipMemo: String = "",
    var enterpriseName: String = "",
    var adminName: String = "",
    var adminMemberId: String = "",
    var adminPhone: String = "",
    var createDate: String = "",
    var hopeDate: String = "",
    var estimateDate: String = "",
    var deliveryDate: String = "",
    var completeDate: String = "",
    var lng: String = "",
    var lat: String = "",
    var shippingMethod: String = "",
    var meituanShopName: String = "",
    var freight: String = "",
    var isShipping: Boolean = false,
    var allowRob: Boolean = false,
    var methodDescr: String = "",
    var printStatus: String = "",
    var hint_btn1: String = "",
    var hint_btn2: String = "",
    var hint_btn3: String = "",
    var hint_btn4: String = ""
) : Parcelable

@Parcelize
data class OrderShipData(
    var id: String = "",
    var name: String = "",
    var linkman: String = "",
    var telephone: String = "",
) : Parcelable

@Parcelize
data class OrderLogData(
    var type: String = "",
    var content: String = "",
    var createDate: String = ""
) : Parcelable

@Parcelize
data class OrderBarrelData(
    var id: String = "",
    var barrelId: String = "",
    var name: String = "",
    var quantity: String? = "",
    var returnQuantity: String? = "0",
    var pledgeQuantity: String? = "0",
    var refundsQuantity: String? = "0",
    var hangQuantity: String? = "0"
) : Parcelable

@Parcelize
data class LatLngBean(
    var point: LatLonPoint,
    var orderIndex: Int = -1,
    var distance: Float = 0f,
    var preDistance: Float = 0f,
) : Parcelable

data class OrderMapData(
    var id: String = "",
    var createDate: String = "",
    var estimateDate: String = "",
    var sn: String = "",
    var member: String = "",
    var consignee: String = "",
    var phone: String = "",
    var address: String = "",
    var amountPaid: String = "",
    var quantity: String = "",
    var lat: String = "",
    var lng: String = ""
) : BaseBean()
